package com.km.team.phsystem.common.enums;

/**
 * Author: jiangjun
 * Date: 2018/10/15
 * Time: 下午5:23
 * Description:
 */
public enum BusinessTypePrefixEnum {

    QUEUE_TYPE_PERSONAL_PREFIX("1", "queue_prefix_personal"),
    QUEUE_TYPE_BATCH_PREFIX("2", "queue_prefix_batch"),
    ;

    /**
     * 类型
     */
    private String type;

    /**
     * 名称
     */
    private String name;

    BusinessTypePrefixEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public static String getName(String type){
        for (BusinessTypePrefixEnum item : BusinessTypePrefixEnum.values()) {
            if(item.getType().equals(type)){
                return item.name;
            }
        }
        return null;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
